Image encoding and decoding, video encoding and decoding: methods, systems and training methods

ABSTRACT

Lossy or lossless compression and transmission, comprising the steps of: (i) receiving an input image; (ii) encoding it using an encoder trained neural network, to produce a y latent representation; (iii) encoding the y latent representation using a hyperencoder trained neural network, to produce a z hyperlatent representation; (iv) quantizing the z hyperlatent representation using a predetermined entropy parameter to produce a quantized z hyperlatent representation; (v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using predetermined entropy parameters; (vi) processing the quantized z hyperlatent representation using a hyperdecoder trained neural network to obtain a location entropy parameter μ y , an entropy scale parameter σ y , and a context matrix A y  of the y latent representation; (vii) processing the y latent representation, the location entropy parameter μ y  and the context matrix A y , to obtain quantized latent residuals; (viii) entropy encoding the quantized latent residuals into a second bitstream, using the entropy scale parameter σ y ; and (ix) transmitting the bitstreams.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of PCT Application No. PCT/GB2021/052770, filed on Oct. 25, 2021, which claims priority to GB Application No. GB 2016824.1, filed on Oct. 23, 2020, the entire contents of each of which being fully incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The field of the invention relates to computer-implemented methods and systems for image encoding and decoding, to computer-implemented methods and systems for video encoding and decoding, to computer-implemented training methods, and to related computer program products.

2. Technical Background

There is increasing demand from users of communications networks for images and video content. Demand is increasing not just for the number of images viewed, and for the playing time of video; demand is also increasing for higher resolution, lower distortion content, if it can be provided. This places increasing demand on communications networks, and increases their energy use, for example, which has adverse cost implications, and possible negative implications for the environment, through the increased energy use.

Although image and video content is usually transmitted over communications networks in compressed form, it is desirable to increase the compression, while preserving displayed image quality, or to increase the displayed image quality, while not increasing the amount of data that is actually transmitted across the communications networks. This would help to reduce the demands on communications networks, compared to the demands that otherwise would be made.

3. Discussion of Related Art

U.S. Pat. No. 10,373,300B1 discloses a system and method for lossy image and video compression and transmission that utilizes a neural network as a function to map a known noise image to a desired or target image, allowing the transfer only of

hyperparameters of the function instead of a compressed version of the image itself. This allows the recreation of a high-quality approximation of the desired image by any system receiving the hyperparameters, provided that the receiving system possesses the same noise image and a similar neural network. The amount of data required to transfer an image of a given quality is dramatically reduced versus existing image compression technology. Being that video is simply a series of images, the application of this image compression system and method allows the transfer of video content at rates greater than previous technologies in relation to the same image quality.

U.S. Pat. No. 10,489,936B1 discloses a system and method for lossy image and video compression that utilizes a metanetwork to generate a set of hyperparameters necessary for an image encoding network to reconstruct the desired image from a given noise image.

SUMMARY OF THE INVENTION

Advantages of the computer-implemented methods, computer systems, and computer program products described below include that they reduce energy consumption.

Decoding computer systems described below may be implemented as a portable device, or as a mobile device e.g. a smartphone, a tablet computer, or a laptop computer. An advantage is that battery charge consumption of the portable device, or of the mobile device may be reduced.

According to a first aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, the method including the steps of:

(i) receiving an input image;

(ii) encoding the input image using an encoder trained neural network, to produce a y latent representation;

(iii) encoding the y latent representation using a hyperencoder trained neural network, to produce a z hyperlatent representation;

(iv) quantizing the z hyperlatent representation using a predetermined entropy parameter to produce a quantized z hyperlatent representation;

(v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using predetermined entropy parameters;

(vi) processing the quantized z hyperlatent representation using a hyperdecoder trained neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation;

(vii) processing the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encoding the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y); and

(ix) transmitting the first bitstream and the second bitstream.

An advantage is that ground-truth variable (image or latent) can readily be used during the training of the compression algorithms; this speeds up training. An advantage is that because the Implicit Encode Solver (IES) also returns the quantized y latent representation, there is no need to run a separate decode solver during training to recover the quantized y latent representation from latent residuals: the quantized y latent representation is already given; this speeds up training. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one wherein in step (iv) the predetermined entropy parameter is a predetermined location entropy parameter μ_(z), and in step (v) the predetermined entropy parameters are the predetermined location entropy parameter μ_(z) and a predetermined entropy scale parameter σ_(z). An advantage is faster processing of the entropy parameters, which reduces encoding time.

The method may be one in which the implicit encoding solver solves the implicit equations

(I) the quantized latent residuals equal a quantisation function of the sum of the y latent representation minus μ_(y) minus A_(y) acting on the quantised y latent representation; and

(II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.

An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one wherein the implicit encoding solver solves the implicit equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used.

An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one wherein the implicit encoding solver solves the implicit equations using an iterative solver, in which iteration is terminated when a convergence criterion is met. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one wherein the implicit encoding solver returns residuals, and a quantized latent representation y. An advantage is that because the Implicit Encode Solver (IES) also returns the quantized y latent representation, there is no need to run a separate decode solver during training to recover the quantized y latent representation from latent residuals: the quantized y latent representation is already given; this speeds up training.

The method may be one wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse, banded structure, or A is a block matrix, or A is constructed so that its matrix norm is less than one, or A is parametrised via a matrix factorisation such as a LU or QR decomposition. An advantage is that encoding time is reduced.

According to a second aspect of the invention, there is provided an encoding computer system for lossy or lossless image or video compression and transmission, the encoding computer system including an encoding computer, an encoder trained neural network, a hyperencoder trained neural network and a hyperdecoder trained neural network, wherein:

(i) the encoding computer is configured to receive an input image;

(ii) the encoding computer is configured to encode the input image using the encoder trained neural network, to produce a y latent representation;

(iii) the encoding computer is configured to encode the y latent representation using the hyperencoder trained neural network, to produce a z hyperlatent representation;

(iv) the encoding computer is configured to quantize the z hyperlatent representation using a predetermined entropy parameter to produce a quantized z hyperlatent representation;

(v) the encoding computer is configured to entropy encode the quantized z hyperlatent representation into a first bitstream, using predetermined entropy parameters;

(vi) the encoding computer is configured to process the quantized z hyperlatent representation using the hyperdecoder trained neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation;

(vii) the encoding computer is configured to process the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) the encoding computer is configured to entropy encode the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y); and

(ix) the encoding computer is configured to transmit the first bitstream and the second bitstream.

The system may be one configured to perform a method of any aspect of the first aspect of the invention.

According to a third aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video decoding, the method including the steps of:

(i) receiving a first bitstream and a second bitstream;

(ii) decoding the first bitstream using an arithmetic decoder, using predetermined entropy parameters, to produce a quantized z hyperlatent representation;

(iii) decoding the quantized z hyperlatent representation using a hyperdecoder trained neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation;

(iv) decoding the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals;

(v) processing the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(vi) decoding the quantized y latent representation using a decoder trained neural network, to obtain a reconstructed image.

An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that decoding time is reduced.

The method may be one wherein in step (ii) the predetermined entropy parameters are a predetermined location entropy parameter μ_(z) and a predetermined entropy scale parameter σ_(z). An advantage is faster processing of the entropy parameters, which reduces decoding time.

The method may be one including the step of (vii) storing the reconstructed image.

The method may be one in which the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation. An advantage is that decoding time is reduced.

The method may be one wherein the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used.

An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that decoding time is reduced.

The method may be one in which an iterative solver is used, in which iteration is terminated when a convergence criterion is reached. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that decoding time is reduced.

The method may be one in which the (e.g. implicit) (e.g. linear) decoding solver (e.g. any linear equation solver) is not necessarily the same type of solver as (e.g. it is different to) the solver used in encoding.

The method may be one wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse, banded structure, or A is a block matrix, or A is constructed so that its matrix norm is less than one, or A is parametrised via a matrix factorisation such as a LU or QR decomposition. An advantage is that decoding time is reduced.

According to a fourth aspect of the invention, there is provided a decoding computer system for lossy or lossless image or video decoding, the decoding computer system including a decoding computer, a decoder trained neural network, and a hyperdecoder trained neural network, wherein:

(i) the decoding computer is configured to receive a first bitstream and a second bitstream;

(ii) the decoding computer is configured to decode the first bitstream using an arithmetic decoder, using predetermined entropy parameters, to produce a quantized z hyperlatent representation;

(iii) the decoding computer is configured to decode the quantized z hyperlatent representation using the hyperdecoder trained neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation;

(iv) the decoding computer is configured to decode the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals;

(v) the decoding computer is configured to process the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(vi) the decoding computer is configured to decode the quantized y latent representation using the decoder trained neural network, to obtain a reconstructed image.

The system may be one wherein the system is configured to perform a method of any aspect according to the third aspect of the invention.

According to a fifth aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, and for lossy or lossless image or video decoding, the method including a method of any aspect of the first aspect of the invention, and a method of any aspect of the third aspect of the invention.

An advantage is that ground-truth variable (image or latent) can readily be used during the training of the compression algorithms; this speeds up training. An advantage is that because the Implicit Encode Solver (IES) also returns the quantized y latent representation, there is no need to run a separate decode solver during training to recover the quantized y latent representation from latent residuals: the quantized y latent representation is already given; this speeds up training. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced. An advantage is that decoding time is reduced.

According to a sixth aspect of the invention, there is provided a system for lossy or lossless image or video compression and transmission, and for lossy or lossless image or video decoding, the system including a system of any aspect of the second aspect of the invention, and a system of any aspect of the fourth aspect of the invention.

According to a seventh aspect of the invention, there is provided a computer implemented method of training an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks, and the entropy parameters, being for use in lossy image or video compression, transmission and decoding, the method including the steps of:

(i) receiving an input training image;

(ii) encoding the input training image using the encoder neural network, to produce a y latent representation;

(iii) encoding the y latent representation using the hyperencoder neural network, to produce a z hyperlatent representation;

(iv) quantizing the z hyperlatent representation using an entropy parameter of the entropy parameters to produce a quantized z hyperlatent representation;

(v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using the entropy parameters;

(vi) processing the quantized z hyperlatent representation using the hyperdecoder neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation;

(vii) processing the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encoding the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y);

(ix) decoding the first bitstream using an arithmetic decoder, using the entropy parameters, to produce a quantized z hyperlatent representation;

(x) decoding the quantized z hyperlatent representation using the hyperdecoder neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation;

(xi) decoding the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals;

(xii) processing the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(xiii) decoding the quantized y latent representation using the decoder neural network, to obtain a reconstructed image;

(xiv) evaluating a loss function based on differences between the reconstructed image and the input training image, and a rate term;

(xv) evaluating a gradient of the loss function;

(xvi) back-propagating the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network and through the encoder neural network, and using the entropy parameters, to update weights of the encoder, decoder, hyperencoder and hyperdecoder neural networks, and to update the entropy parameters; and

(xvii) repeating steps (i) to (xvi) using a set of training images, to produce a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network and a trained hyperdecoder neural network, and trained entropy parameters; and

(xviii) storing the weights of the trained encoder neural network, the trained decoder neural network, the trained hyperencoder neural network and the trained hyperdecoder neural network, and storing the trained entropy parameters.

An advantage is that ground-truth variable (image or latent) can readily be used during the training of the compression algorithms. An advantage is that because the Implicit Encode Solver (IES) also returns the quantized y latent representation, there is no need to run a separate decode solver during training to recover the quantized y latent representation from latent residuals: the quantized y latent representation is already given. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced. An advantage is that decoding time is reduced.

The method may be one wherein in step (iv) the entropy parameter is a location entropy parameter μ_(z), and in steps (v), (ix) and (xvi) to (xviii) the entropy parameters are the location entropy parameter μ_(z) and an entropy scale parameter σ_(z). An advantage is that faster processing of entropy parameters is provided, and therefore encoding time is reduced. An advantage is that faster processing of entropy parameters is provided, and therefore decoding time is reduced.

The method may be one in which the implicit encoding solver solves the implicit equations

(I) the quantized latent residuals equal a quantisation function of the sum of the y latent representation minus μ_(y) minus A_(y) acting on the quantised y latent representation; and

(II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.

An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one in which the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation. An advantage is that decoding time is reduced.

The method may be one in which ground-truth variable (image or latent) is used during the training of compression algorithms. An advantage is that encoding time is reduced.

The method may be one wherein the implicit encoding solver solves the implicit equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that encoding time is reduced.

The method may be one wherein the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used. An advantage is that the computational cost of using an iterative linear solver in an AI-based compression pipeline can account for a tiny fraction of the total computations in the entire pipeline. An advantage is that decoding time is reduced.

The method may be one wherein the quantized y latent representation returned by the solver is used elsewhere in the data compression pipeline, thus removing the need to run a Decode Solver during training, which may massively decrease the time needed to train an AI-based compression algorithm.

The method may be one wherein the implicit encoding solver solves the implicit equations using an iterative solver, in which iteration is terminated when a convergence criterion is met.

The method may be one wherein the implicit encoding solver returns residuals, and a quantized latent representation y.

The method may be one wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse, banded structure, or A is a block matrix, or A is constructed so that its matrix norm is less than one, or A is parametrised via a matrix factorisation such as a LU or QR decomposition. An advantage is that encoding time is reduced. An advantage is that decoding time is reduced.

The method may be one wherein the (e.g. implicit) (e.g. linear) decoding solver (e.g. any linear equation solver) is not necessarily the same type of solver as (e.g. it is different to) the solver used in encoding.

According to an eighth aspect of the invention, there is provided a computer program product executable on a processor to train an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks, and the entropy parameters, being for use in lossy image or video compression, transmission and decoding, the computer program product executable on the processor to:

(i) receive an input training image;

(ii) encode the input training image using the encoder neural network, to produce a y latent representation;

(iii) encode the y latent representation using the hyperencoder neural network, to produce a z hyperlatent representation;

(iv) quantize the z hyperlatent representation using an entropy parameter of the entropy parameters to produce a quantized z hyperlatent representation;

(v) entropy encode the quantized z hyperlatent representation into a first bitstream, using the entropy parameters;

(vi) process the quantized z hyperlatent representation using the hyperdecoder neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation;

(vii) process the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encode the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y);

(ix) decode the first bitstream using an arithmetic decoder, using the entropy parameters, to produce a quantized z hyperlatent representation;

(x) decode the quantized z hyperlatent representation using the hyperdecoder neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation;

(xi) decode the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals;

(xii) process the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(xiii) decode the quantized y latent representation using the decoder neural network, to obtain a reconstructed image;

(xiv) evaluate a loss function based on differences between the reconstructed image and the input training image, and a rate term;

(xv) evaluate a gradient of the loss function;

(xvi) back-propagate the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network and through the encoder neural network, and use the entropy parameters, to update weights of the encoder, decoder, hyperencoder and hyperdecoder neural networks, and to update the entropy parameters; and

(xvii) repeat (i) to (xvi) using a set of training images, to produce a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network and a trained hyperdecoder neural network, and trained entropy parameters; and

(xviii) store the weights of the trained encoder neural network, the trained decoder neural network, the trained hyperencoder neural network and the trained hyperdecoder neural network, and store the trained entropy parameters.

The computer program product may be one executable on the processor to perform a method of any aspect of the seventh aspect of the invention.

According to a ninth aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, the method including the steps of:

(i) receiving an input image;

(ii) encoding the input image using an encoder trained neural network, to produce a y latent representation;

(iii) encoding the y latent representation using a hyperencoder trained neural network, to produce a z hyperlatent representation;

(iv) quantizing the z hyperlatent representation using a pre-learned entropy parameter to produce a quantized z hyperlatent representation;

(v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function dependent on pre-learned entropy parameters including the pre-learned entropy parameter;

(vi) processing the quantized z hyperlatent representation using a hyperdecoder trained neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of the y latent representation;

(vii) processing the y latent representation, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encoding the quantized latent residuals into a second bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function, and the entropy scale parameter σ_(y); and

(ix) transmitting the first bitstream and the second bitstream.

An advantage is that encoding can be done quickly, by solving a simple implicit equation. An advantage is reduced encoding time. An advantage is that parameters of the autoregressive model are conditioned on a quantized hyperlatent representation.

The method may be one wherein in step (iv) the pre-learned entropy parameter is a pre-learned location entropy parameter μ_(z), and in step (v) the pre-learned entropy parameters are the pre-learned location entropy parameter μ_(z) and a pre-learned entropy scale parameter σ_(z). An advantage is faster processing of the entropy parameters, which reduces encoding time.

The method may be one wherein in step (viii) the one dimensional discrete probability mass function has zero mean.

The method may be one in which the implicit encoding solver solves the implicit equations

(I) the quantized latent residuals equal a rounding function of the sum of the y latent representation minus μ_(y) minus L_(y) acting on the quantised y latent representation; and

(II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus L_(y) acting on the quantised y latent representation.

An advantage is that encoding time is reduced.

The method may be one in which an equation that the quantised y latent representation ŷ equals the quantized value of the y latent representation minus a location entropy parameter μ minus an L context matrix acting on the quantised y latent representation ŷ, plus the location entropy parameter μ, plus an L context matrix L_(ij) acting on the quantised y latent representation ŷ, is solved, in which this equation is solved serially, operating on the pixels according to the ordering of their dependencies in the autoregressive model, in which all pixels are iterated through in their autoregressive ordering, and

$\left. {{\hat{y}}_{i} = \left\lfloor {y_{i} - \mu_{i} - {\sum\limits_{j = {i - k}}^{i - 1}{L_{ij}{\hat{y}}_{j}}}} \right.} \right\rceil + \mu_{i} + {\sum\limits_{j = {i - k}}^{i - 1}{L_{ij}{\hat{y}}_{j}}}$

is applied at each iteration to retrieve the quantised latent at the current iteration. An advantage is that encoding time is reduced.

The method may be one in which an autoregressive structure defined by the sparse context matrix L is exploited to parallelise components of the serial decoding pass; in this approach, first a dependency graph, a Directed Acyclic Graph (DAG), is created defining dependency relations between the latent pixels; this dependency graph is constructed based on the sparsity structure of the L matrix; then, the pixels in the same level of the DAG which are conditionally independent of each other are all calculated in parallel, without impacting the calculations of any other pixels in their level; and the graph is iterated over by starting at the root node, and working through the levels of the DAG, and at each level, all nodes are processed in parallel. An advantage is that encoding time is reduced.

The method may be one wherein a learned L-context module is employed in the entropy model on the quantized latent representation y.

According to a tenth aspect of the invention, there is provided an encoding computer system for lossy or lossless image or video compression and transmission, the encoding computer system including an encoding computer, an encoder trained neural network, a hyperencoder trained neural network and a hyperdecoder trained neural network, wherein:

(i) the encoding computer is configured to receive an input image;

(ii) the encoding computer is configured to encode the input image using the encoder trained neural network, to produce a y latent representation;

(iii) the encoding computer is configured to encode the y latent representation using the hyperencoder trained neural network, to produce a z hyperlatent representation;

(iv) the encoding computer is configured to quantize the z hyperlatent representation using a pre-learned entropy parameter to produce a quantized z hyperlatent representation;

(v) the encoding computer is configured to entropy encode the quantized z hyperlatent representation into a first bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function dependent on pre-learned entropy parameters including the pre-learned entropy parameter;

(vi) the encoding computer is configured to process the quantized z hyperlatent representation using the hyperdecoder trained neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of the y latent representation;

(vii) the encoding computer is configured to process the y latent representation, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) the encoding computer is configured to entropy encode the quantized latent residuals into a second bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function, and the entropy scale parameter σ_(y); and

(ix) the encoding computer is configured to transmit the first bitstream and the second bitstream.

The system may be configured to perform a method of any aspect of the ninth aspect of the invention.

According to an eleventh aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video decoding, the method including the steps of:

(i) receiving a first bitstream and a second bitstream;

(ii) decoding the first bitstream using an arithmetic decoder, using a one dimensional discrete probability mass function dependent on pre-learned location entropy parameters, to produce a quantized z hyperlatent representation;

(iii) decoding the quantized z hyperlatent representation using a hyperdecoder trained neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of a y latent representation;

(iv) decoding the second bitstream using an arithmetic decoder, the one dimensional discrete probability mass function, and the entropy scale parameter σ_(y), to output quantised latent residuals;

(v) processing the quantized latent residuals, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(vi) decoding the quantized y latent representation using a decoder trained neural network, to obtain a reconstructed image.

An advantage is that the decoding pass of the L-context modelling step is not a serial procedure, and can be run in parallel, which reduces decoding time. An advantage is reduced decoding time. An advantage is that parameters of the autoregressive model are conditioned on a quantized hyperlatent representation.

The method may be one wherein in step (ii) the pre-learned entropy parameters are a pre-learned location entropy parameter μ_(z) and a pre-learned entropy scale parameter σ_(z). An advantage is faster processing of the entropy parameters, which reduces encoding time.

The method may be one wherein in step (iv) the one dimensional discrete probability mass function has zero mean.

The method may be one including the step of (vii) storing the reconstructed image.

The method may be one in which the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus L_(y) acting on the quantised y latent representation. An advantage is that decoding time is reduced.

The method may be one in which the equation system is lower triangular, and standard forward substitution is used to solve the (e.g. implicit) equation. An advantage is that decoding time is reduced.

The method may be one in which an autoregressive structure defined by the sparse context matrix L is exploited to parallelise components of the serial decoding pass; in this approach, first a dependency graph, a Directed Acyclic Graph (DAG), is created modelling dependency relations between the latent pixels; this dependency graph is constructed based on the sparsity structure of the L matrix; then, the quantized y latents are recovered from the quantized residuals by iterating through the layers of the DAG and processing all pixels of the level in parallel, using the linear decode equations. An advantage is that decoding time is reduced.

The method may be one wherein the decoding pass of the L-context modelling step is not a serial procedure, and can be run in parallel. An advantage is that decoding time is reduced.

The method may be one wherein because recovering the quantized residuals from the second bitstream is not autoregressive, this process is extremely fast. An advantage is that decoding time is reduced.

The method may be one in which an L-context module is employed, if an L-context module was used in encode. An advantage is that decoding time is reduced.

According to a twelfth aspect of the invention, there is provided a decoding computer system for lossy or lossless image or video decoding, the decoding computer system including a decoding computer, a decoder trained neural network, and a hyperdecoder trained neural network, wherein:

(i) the decoding computer is configured to receive a first bitstream and a second bitstream;

(ii) the decoding computer is configured to decode the first bitstream using an arithmetic decoder, using a one dimensional discrete probability mass function dependent on pre-learned location entropy parameters, to produce a quantized z hyperlatent representation;

(iii) the decoding computer is configured to decode the quantized z hyperlatent representation using the hyperdecoder trained neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of a y latent representation;

(iv) the decoding computer is configured to decode the second bitstream using an arithmetic decoder, the one dimensional discrete probability mass function, and the entropy scale parameter σ_(y), to output quantised latent residuals;

(v) the decoding computer is configured to process the quantized latent residuals, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(vi) the decoding computer is configured to decode the quantized y latent representation using a decoder trained neural network, to obtain a reconstructed image.

The system may be configured to perform a method of any aspect according to the eleventh aspect of the invention.

According to a thirteenth aspect of the invention, there is provided a computer-implemented method for lossy or lossless image or video compression and transmission, and for lossy or lossless image or video decoding, the method including a method of any aspect of the ninth aspect of the invention, and a method of any aspect of the eleventh aspect of the invention. An advantage is that encoding can be done quickly, by solving a simple implicit equation. An advantage is reduced encoding time. An advantage is that parameters of the autoregressive model are conditioned on a quantized hyperlatent representation. An advantage is that the decoding pass of the L-context modelling step is not a serial procedure, and can be run in parallel, which reduces decoding time. An advantage is reduced decoding time.

According to a fourteenth aspect of the invention, there is provided a system for lossy or lossless image or video compression and transmission, and for lossy or lossless image or video decoding, the system including a system of any aspect of the tenth aspect of the invention, and a system of any aspect of the twelfth aspect of the invention.

According to a fifteenth aspect of the invention, there is provided a computer implemented method of training an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks and the entropy parameters being for use in lossy image or video compression, transmission and decoding, the method including the steps of:

(i) receiving an input training image;

(ii) encoding the input training image using the encoder neural network, to produce a y latent representation;

(iii) encoding the y latent representation using the hyperencoder neural network, to produce a z hyperlatent representation;

(iv) quantizing the z hyperlatent representation using an entropy parameter of the entropy parameters to produce a quantized z hyperlatent representation;

(v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function dependent on the entropy parameters;

(vi) processing the quantized z hyperlatent representation using the hyperdecoder neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of the y latent representation;

(vii) processing the y latent representation, the location entropy parameter μ_(y) and the L-context context matrix L_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encoding the quantized latent residuals into a second bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function, and the entropy scale parameter σ_(y); and

(ix) decoding the first bitstream using an arithmetic decoder, using the one dimensional discrete probability mass function dependent on the entropy parameters, to produce a quantized z hyperlatent representation;

(x) decoding the quantized z hyperlatent representation using the hyperdecoder neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of a y latent representation;

(xi) decoding the second bitstream using an arithmetic decoder, the one dimensional discrete probability mass function, and the entropy scale parameter σ_(y), to output quantised latent residuals;

(xii) processing the quantized latent residuals, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(xiii) decoding the quantized y latent representation using the decoder neural network, to obtain a reconstructed image;

(xiv) evaluating a loss function based on differences between the reconstructed image and the input training image, and a rate term;

(xv) evaluating a gradient of the loss function;

(xvi) back-propagating the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network and through the encoder neural network, and using the entropy parameters, to update weights of the encoder, decoder, hyperencoder and hyperdecoder neural networks, and to update the entropy parameters; and

(xvii) repeating steps (i) to (xvi) using a set of training images, to produce a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network and a trained hyperdecoder neural network, and trained entropy parameters; and

(xviii) storing the weights of the trained encoder neural network, the trained decoder neural network, the trained hyperencoder neural network and the trained hyperdecoder neural network, and storing the trained entropy parameters.

An advantage is that encoding can be done quickly, by solving a simple implicit equation. An advantage is reduced encoding time. An advantage is that parameters of the autoregressive model are conditioned on a quantized hyperlatent representation. An advantage is that the decoding pass of the L-context modelling step is not a serial procedure, and can be run in parallel, which reduces decoding time. An advantage is reduced decoding time.

The method may be one wherein in step (iv) the entropy parameter is a location entropy parameter μ_(z), and in steps (v), (ix) and (xvi) to (xviii) the entropy parameters are the location entropy parameter μ_(z) and an entropy scale parameter σ_(z). An advantage is that faster processing of entropy parameters is provided, and therefore encoding time is reduced. An advantage is that faster processing of entropy parameters is provided, and therefore decoding time is reduced.

The method may be one wherein in steps (viii) and (xi) the one dimensional discrete probability mass function has zero mean.

The method may be one in which the implicit encoding solver solves the implicit equations

(I) the quantized latent residuals equal a rounding function of the sum of the y latent representation minus μ_(y) minus L_(y) acting on the quantised y latent representation; and

(II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus L_(y) acting on the quantised y latent representation. An advantage is that encoding time is reduced.

The method may be one in which the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus L_(y) acting on the quantised y latent representation. An advantage is that decoding time is reduced.

The method may be one in which an equation that the quantised y latent representation ŷ equals the quantized value of the y latent representation minus a location entropy parameter μ minus an L context matrix acting on the quantised y latent representation ŷ, plus the location entropy parameter μ, plus an L context matrix L_(ij) acting on the quantised y latent representation ŷ, is solved, in which this equation is solved serially, operating on the pixels according to the ordering of their dependencies in the autoregressive model, in which all pixels are iterated through in their autoregressive ordering, and

$\left. {{\hat{y}}_{i} = \left\lfloor {y_{i} - \mu_{i} - {\sum\limits_{j = {i - k}}^{i - 1}{L_{ij}{\hat{y}}_{j}}}} \right.} \right\rceil + \mu_{i} + {\sum\limits_{j = {i - k}}^{i - 1}{L_{ij}{\hat{y}}_{j}}}$

is applied at each iteration to retrieve the quantised latent at the current iteration. An advantage is that encoding time is reduced.

The method may be one in which an autoregressive structure defined by the sparse context matrix L is exploited to parallelise components of the serial decoding pass; in this approach, first a dependency graph, a Directed Acyclic Graph, is created defining dependency relations between the latent pixels; this dependency graph is constructed based on the sparsity structure of the L matrix; then, the pixels in the same level of the DAG which are conditionally independent of each other are all calculated in parallel, without impacting the calculations of any other pixels in their level; and the graph is iterated over by starting at the root node, and working through the levels of the DAG, and at each level, all nodes are processed in parallel. An advantage is that encoding time is reduced. An advantage is that decoding time is reduced.

According to a sixteenth aspect of the invention, there is provided a computer program product executable on a processor to train an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks, and the entropy parameters, being for use in lossy image or video compression, transmission and decoding, the computer program product executable on the processor to:

(i) receive an input training image;

(ii) encode the input training image using the encoder neural network, to produce a y latent representation;

(iii) encode the y latent representation using the hyperencoder neural network, to produce a z hyperlatent representation;

(iv) quantize the z hyperlatent representation using an entropy parameter of the entropy parameters to produce a quantized z hyperlatent representation;

(v) entropy encode the quantized z hyperlatent representation into a first bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function dependent on the entropy parameters;

(vi) process the quantized z hyperlatent representation using the hyperdecoder neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of the y latent representation;

(vii) process the y latent representation, the location entropy parameter μ_(y) and the L-context context matrix L_(y), using an implicit encoding solver, to obtain quantized latent residuals;

(viii) entropy encode the quantized latent residuals into a second bitstream, using an arithmetic encoder, using a one dimensional discrete probability mass function, and the entropy scale parameter σ_(y); and

(ix) decode the first bitstream using an arithmetic decoder, using the one dimensional discrete probability mass function dependent on the entropy parameters, to produce a quantized z hyperlatent representation;

(x) decode the quantized z hyperlatent representation using the hyperdecoder neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a L-context matrix L_(y) of a y latent representation;

(xi) decode the second bitstream using an arithmetic decoder, the one dimensional discrete probability mass function, and the entropy scale parameter σ_(y), to output quantised latent residuals;

(xii) process the quantized latent residuals, the location entropy parameter μ_(y) and the L-context matrix L_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation;

(xiii) decode the quantized y latent representation using the decoder neural network, to obtain a reconstructed image;

(xiv) evaluate a loss function based on differences between the reconstructed image and the input training image, and a rate term;

(xv) evaluate a gradient of the loss function;

(xvi) back-propagate the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network and through the encoder neural network, and to use the entropy parameters, to update weights of the encoder, decoder, hyperencoder and hyperdecoder neural networks, and to update the entropy parameters; and

(xvii) repeat (i) to (xvi) using a set of training images, to produce a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network and a trained hyperdecoder neural network, and trained entropy parameters; and

(xviii) store the weights of the trained encoder neural network, the trained decoder neural network, the trained hyperencoder neural network and the trained hyperdecoder neural network, and storing the trained entropy parameters.

The computer program product may be executable on the processor to perform a method of any aspect of the fifteenth aspect of the invention.

According to a seventeenth aspect of the invention, there is provided a computer implemented method of training a total neural network including a neural network which modifies encoder-decoder performance, the total neural network parameterized by parameters θ and including encoder and decoder neural networks for use in lossy image or video compression, transmission and decoding, the method including the steps of:

(i) receiving an input training image x;

(ii) encoding the input training image using the encoder neural network, to produce a latent representation;

(iii) quantizing the latent representation to produce a quantized latent ŷ;

(iv) using the decoder neural network to produce an output image {circumflex over (x)} from the quantized latent, wherein the output image is an approximation of the input image;

(v) evaluating a Lagrangian loss function including a Lagrange multiplier λ, based on evaluation of a distortion function of differences between the output image and the input training image, and based on differences between a compression rate function of the quantized latent R(ŷ) and a target compression rate r₀;

(vi) calculating total neural network parameter gradients using backpropagation of the evaluated Lagrangian loss function;

(vii) updating the total network parameters θ by performing a descent step of the Lagrangian loss function with respect to the total network parameters θ based on the total neural network parameter gradients evaluated in step (vi);

(viii) updating the Lagrange multiplier by performing an ascent step of the Lagrangian loss function with respect to the Lagrange multiplier;

(ix) repeating steps (i) to (viii) using a set of training images, to produce a trained set of parameters θ, and optionally a target compression rate r₀; and

(x) storing the trained set of parameters θ.

An advantage is that given a target compression rate, distortion is minimized, subject to the constraint that the average model compression rate be equal to the target compression rate. An advantage is this allows to minimize the image distortion, for a given target compression rate. An advantage is to reliably train deep neural networks for specified rate targets, averaged across a test set. Advantages include: reliable constraint enforcement, stability.

According to an 18th aspect of the invention, there is provided a computer implemented method of training a total neural network including a neural network which modifies encoder-decoder performance, the total neural network parameterized by parameters θ and including encoder and decoder neural networks for use in lossy image or video compression, transmission and decoding, the method including the steps of:

(i) receiving an input training image x;

(ii) encoding the input training image using the encoder neural network, to produce a latent representation;

(iii) quantizing the latent representation to produce a quantized latent ŷ;

(iv) using the decoder neural network to produce an output image {circumflex over (x)} from the quantized latent, wherein the output image is an approximation of the input image;

(v) evaluating an augmented Lagrangian loss function including a Lagrange multiplier λ, based on evaluation of a distortion function of differences between the output image and the input training image, and based on differences between a compression rate function of the quantized latent R(ŷ) and a target compression rate r₀;

(vi) calculating total neural network parameter gradients using backpropagation of the evaluated augmented Lagrangian loss function;

(vii) updating the total network parameters θ by performing an optimizer step in which a SGD or SGD-like optimizer optimizes the total network parameters θ based on a learning rate for the network parameters optimizer and the total neural network parameter gradients evaluated in step (vi);

(viii) evaluating gradients for the Lagrange multiplier by evaluating an augmented Lagrangian loss function quadratic term weight μ multiplied by a difference between the compression rate function of the quantized latent and the target compression rate;

(ix) updating the Lagrange multiplier by performing an optimizer step in which a SGD or SGD-like optimizer optimizes the Lagrange multiplier based on a learning rate for the Lagrange multiplier optimizer;

(x) repeating steps (i) to (ix) using a set of training images, to produce a trained set of parameters θ, and

(xi) storing the trained set of parameters θ.

An advantage is this allows to minimize the image distortion, for a fixed rate. An advantage is to reliably train deep neural networks for specified rate targets, averaged across a test set. Advantages include: reliable constraint enforcement, stability, robust to variations in hyperparameters, recover original rate-distortion objective as the loss is minimised.

The method may be one including the step of clipping the gradients for the Lagrange multiplier evaluated in step (viii), and including updating the Lagrange multiplier by performing the optimizer step in which the SGD or SGD-like optimizer optimizes the Lagrange multiplier based on the learning rate for the Lagrange multiplier optimizer and the clipped gradients for the Lagrange multiplier.

The method may be one wherein the trained set of parameters θ is a converged set of parameters θ.

The method may be one wherein the augmented Lagrangian loss function is D(x, {circumflex over (x)})+λ(R(ŷ)−r₀)+μ(R(ŷ)−r₀)²/2, where D is a function measuring distortion of data reconstruction.

The method may be one wherein step (x) includes modifying the Lagrange multiplier by the learning rate for the Lagrange multiplier optimizer times the loss function quadratic term weight multiplied by a difference between the compression rate function of the quantized latent and the target compression rate. An advantage is that the multiplier converges in a reasonable amount of time.

The method may be one wherein decoupling the learning rate for the Lagrange multiplier from the loss function quadratic term weight through the introduction of the factor of the learning rate for the Lagrange multiplier optimizer means that the loss function quadratic term weight can be kept small, while the multiplier converges in a reasonable amount of time. An advantage is that the multiplier converges in a reasonable amount of time.

The method may be one wherein the SGD-like optimizer optimizing the Lagrange multiplier is an Adam optimizer. Advantages are increased stability, adaptability, and being significantly more robust to variations in architectures, rate targets, and choices of hyperparameters.

The method may be one in which the quantized latent compression rate is calculated using a training quantisation function in the forward pass steps (iii) and (iv), and in the backward pass steps (v) to (viii) (i.e. in gradient computation) when updating the total neural network parameters θ, but the quantized latent compression rate is calculated using an inference quantisation function when performing updates to the Augmented Lagrangian Method's Lagrange multiplier steps (viii), and (ix). An advantage is that converging to a target rate on a training set of images reasonably guarantees that we will have the same constraint satisfied on a test set of images.

The method may be one in which the quantized latent is calculated using an inference quantisation function in the forward pass steps (iii) and (iv), and in the backward pass steps (v) to (viii) (i.e. in gradient computation) the quantized latent is calculated using a training quantisation function. An advantage is that converging to a target rate on a training set of images reasonably guarantees that we will have the same constraint satisfied on a test set of images.

The method may be one wherein the set of training images used is a set of training images used to train the encoder and the decoder, modified so as to be compressed to the target compression rate; the distortion function in step (v) is reduced by a scale factor s (e.g. approximately two, initially); during training, a running average of scaled distortion is updated; at predefined iterations of training, the scale factor s is adjusted in proportion to (e.g. two times) the running average, and the Lagrange multiplier is modified by a factor in inverse proportion to the adjustment to the scale factor. An advantage is that the method ensures the loss function is roughly of the same scale, no matter the target rate.

The method may be one in which the running average is one of: arithmetic mean, median, geometric mean, harmonic mean, exponential moving average, smoothed moving average, linear weighted moving average. An advantage is that the method ensures the loss function is roughly of the same scale, no matter the target rate.

The method may be one wherein the quantized latent is represented using a probability distribution of the latent space, the probability distribution including a location parameter and a scale parameter σ, wherein σ is reduced as the computer implemented method of training proceeds, e.g. using a decaying scale threshold. An advantage is this causes neural network training to avoid bad local minima, resulting in improved overall image encoding and decoding performance, i.e. reduced reconstructed image distortion, for a fixed rate.

The method may be one in which the probability distribution is Gaussian or Laplacian.

The method may be one wherein σ is reduced as the computer implemented method of training proceeds, until σ reaches a final value.

The method may be one wherein σ is reduced as the computer implemented method of training proceeds, using a progressively decreasing thresholding value t. An advantage is this causes neural network training to avoid bad local minima, resulting in improved overall image encoding and decoding performance, i.e. reduced reconstructed image distortion, for a fixed rate.

The method may be one wherein σ is reduced as the computer implemented method of training proceeds, decaying t linearly with respect to the number of training iterations.

The method may be one wherein σ is reduced as the computer implemented method of training proceeds, decaying t exponentially with respect to the number of training iterations.

The method may be one wherein σ is reduced as the computer implemented method of training proceeds, decaying t with respect to the loss metric.

The method may be one wherein the quantized latent is represented using a probability distribution of the latent space, the probability distribution including a location parameter and a scale parameter σ, wherein all realisations of σ are thresholded to a fixed value.

The method may be one wherein all realisations of σ are mapped with functions of a strictly positive codomain, for a defined domain, such as the softplus operation, or the squaring operation with thresholding, or the absolute value operation with thresholding.

According to a 19th aspect of the invention, there is provided a computer program product executable on a processor to train a total neural network including a neural network which modifies encoder-decoder performance, the total neural network parameterized by parameters θ and including encoder and decoder neural networks for use in lossy image or video compression, transmission and decoding, the computer program product executable on the processor to:

(i) receive an input training image x;

(ii) encode the input training image using the encoder neural network, to produce a latent representation;

(iii) quantize the latent representation to produce a quantized latent ŷ;

(iv) use the decoder neural network to produce an output image {circumflex over (x)} from the quantized latent, wherein the output image is an approximation of the input image;

(v) evaluate a Lagrangian loss function including a Lagrange multiplier λ, based on evaluation of a distortion function of differences between the output image and the input training image, and based on differences between a compression rate function of the quantized latent R(ŷ) and a target compression rate r₀;

(vi) calculate total neural network parameter gradients using backpropagation of the evaluated Lagrangian loss function;

(vii) update the total network parameters θ by performing a descent step of the Lagrangian loss function with respect to the total network parameters θ based on the total neural network parameter gradients evaluated in (vi);

(viii) update the Lagrange multiplier by performing an ascent step of the Lagrangian loss function with respect to the Lagrange multiplier;

(ix) repeat (i) to (viii) using a set of training images, to produce a trained set of parameters θ, and optionally a target compression rate r₀; and

(x) store the trained set of parameters θ.

The computer program product may be executable on the processor to perform a method of any aspect of the 17th aspect of the invention.

According to a 20th aspect of the invention, there is provided a computer program product executable on a processor to train a total neural network including a neural network which modifies encoder-decoder performance, the total neural network parameterized by parameters θ and including encoder and decoder neural networks for use in lossy image or video compression, transmission and decoding, the computer program product executable on the processor to:

(i) receive an input training image x;

(ii) encode the input training image using the encoder neural network, to produce a latent representation;

(iii) quantize the latent representation to produce a quantized latent ŷ;

(iv) use the decoder neural network to produce an output image {circumflex over (x)} from the quantized latent, wherein the output image is an approximation of the input image;

(v) evaluate an augmented Lagrangian loss function including a Lagrange multiplier λ, based on evaluation of a distortion function of differences between the output image and the input training image, and based on differences between a compression rate function of the quantized latent R(ŷ) and a target compression rate r₀;

(vi) calculate total neural network parameter gradients using backpropagation of the evaluated augmented Lagrangian loss function;

(vii) update the total network parameters θ by performing an optimizer step in which a SGD or SGD-like optimizer optimizes the total network parameters θ based on a learning rate for the network parameters optimizer and the total neural network parameter gradients evaluated in (vi);

(viii) evaluate gradients for the Lagrange multiplier by evaluating an augmented Lagrangian loss function quadratic term weight μ multiplied by a difference between the compression rate function of the quantized latent and the target compression rate;

(ix) update the Lagrange multiplier by performing an optimizer step in which a SGD or SGD-like optimizer optimizes the Lagrange multiplier based on a learning rate for the Lagrange multiplier optimizer;

(x) repeat (i) to (ix) using a set of training images, to produce a trained set of parameters θ, and

(xi) store the trained set of parameters θ.

The computer program product may be executable on the processor to perform a method of any aspect of the 18th aspect of the invention.

According to a 21st aspect of the invention, there is provided a computer implemented method of training an encoder neural network to reduce encoder distortions, the encoder neural network parameterized by parameters θ, the encoder being a neural network for use in lossy image or video compression, the method including the steps of:

(i) receiving an input training image x;

(ii) encoding the input training image using the encoder neural network, to produce an image reconstruction y;

-   -   (iii) passing the input training image x through a feature         embedding network that has been pre-trained on a training set of         images to produce output {tilde over (x)} containing features;

(iv) passing the image reconstruction y through the feature embedding network to produce output {tilde over (y)} containing features;

(v) partitioning the output {tilde over (x)} into a set of N equally sized feature vectors {tilde over (X)}={{tilde over (x)}_(i)};

(vi) partitioning the output {tilde over (y)} into a set of N equally sized feature vectors {tilde over (Y)}={{{tilde over (y)}_(i)};

(vii) for each pair of feature vectors {tilde over (x)}_(i) and {tilde over (y)}_(j), evaluating a distance element d_(i,j), for example a cosine distance;

(viii) for each distance element d_(i,j), calculating a normalised distance element {tilde over (d)}_(i,j), for example d_(i,j)/(min_(k) d_(i,k)+ε), where ε is a small positive constant;

(ix) for each normalised distance element {tilde over (d)}_(i,j), calculating a similarity element w_(i,j) which is an exponentially decreasing function of {tilde over (d)}_(i,j), for example exp((1−{tilde over (d)}_(i,j))/h), where h is positive and is a bandwidth parameter;

(x) for each similarity element w_(i,j), calculating c_(i,j) which is w_(i,j)/(Σ_(k) w_(i,k));

(xi) calculating a context loss;

(xii) evaluating a loss function, which is the sum of the context loss and an additional loss for the generator, which is a function of x and y;

(xiii) backpropagating the loss function;

(xiv) optimizing the encoder neural network parameterized by the parameters θ;

(xv) repeating steps (i) to (xiv) using a set of training images, to produce a trained set of parameters θ, and

(xvi) storing the trained set of parameters θ.

An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one wherein the context loss is minus C({tilde over (X)},{tilde over (Y)}), where C({tilde over (X)},{tilde over (Y)}) equals (Σ_(j) max_(i) c_(i,j)) divided by N. An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one wherein the context loss is a weighted average of minus C({tilde over (X)},{tilde over (Y)}) and minus C({tilde over (Y)},{tilde over (X)}), where C({tilde over (X)},{tilde over (Y)}) equals (Σ_(j) max_(i) c_(i,j)) divided by N. An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one wherein the context loss is an arithmetic average of minus C({tilde over (X)},{tilde over (Y)}) and minus C({tilde over (Y)},{tilde over (X)}), where C({tilde over (X)},{tilde over (Y)}) equals (Σ_(j) max_(i) c_(i,j)) divided by N. An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one in which the context loss further includes Deep Render's adversarial Video Multimethod Assessment Fusion (VMAF) proxy, or a Learned Perceptual Image Patch Similarity (LPIPS) or a generative adversarial loss. An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one in which this approach leads to strongly improved perceived visual quality of the reconstructed images, as perceived using the human visual system.

The method may be one in which statistical distances between representations of the images in some latent feature space are used. An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

According to a 22nd aspect of the invention, there is provided a computer program product executable on a processor to train an encoder neural network to reduce encoder distortions, the encoder neural network parameterized by parameters θ, the encoder being a neural network for use in lossy image or video compression, the computer program product executable on the processor to:

(i) receive an input training image x;

(ii) encode the input training image using the encoder neural network, to produce an image reconstruction y;

(iii) pass the input training image x through a feature embedding network that has been pre-trained on a training set of images to produce output {tilde over (x)} containing features;

(iv) pass the image reconstruction y through the feature embedding network to produce output {tilde over (y)} containing features;

(v) partition the output {tilde over (x)} into a set of N equally sized feature vectors {tilde over (X)}={{tilde over (x)}_(i)};

(vi) partition the output {tilde over (y)} into a set of N equally sized feature vectors {tilde over (Y)}={{{tilde over (y)}_(i)};

(vii) for each pair of feature vectors {tilde over (x)}_(i) and {tilde over (y)}_(j), evaluate a distance element d_(i,j), for example a cosine distance;

(viii) for each distance element d_(i,j), calculate a normalised distance element {tilde over (d)}_(i,j), for example d_(i,j)/(min_(k) d_(i,k)+ε), where ε is a small positive constant;

(ix) for each normalised distance element {tilde over (d)}_(i,j), calculate a similarity element w_(i,j) which is an exponentially decreasing function of {tilde over (d)}_(i,j), for example exp((1−{tilde over (d)}_(i,j))/h), where h is positive and is a bandwidth parameter;

(x) for each similarity element w_(i,j), calculate c_(i,j) which is w_(i,j)/(Σ_(k) w_(i,k));

(xi) calculate a context loss;

(xii) evaluate a loss function, which is the sum of the context loss and an additional loss for the generator, which is a function of x and y;

(xiii) backpropagate the loss function;

(xiv) optimize the encoder neural network parameterized by the parameters θ;

(xv) repeat (i) to (xiv) using a set of training images, to produce a trained set of parameters θ, and

(xvi) store the trained set of parameters θ.

The computer program product may be executable on the processor to perform a method of any aspect of the 21st aspect of the invention.

According to a 23rd aspect of the invention, there is provided a computer implemented method of training an encoder neural network to reduce encoder distortions, the encoder neural network parameterized by parameters θ, the encoder being a neural network for use in lossy image or video compression, the method including the steps of:

(i) receiving an input training image x;

(ii) encoding the input training image using the encoder neural network, to produce an image reconstruction y;

(iii) passing the input training image x through a feature embedding network that has been pre-trained on a training set of images to produce output {tilde over (x)} containing features;

(iv) passing the image reconstruction y through the feature embedding network to produce output {tilde over (y)} containing features;

(v) executing a function on y to ensure no gradients are tracked for the later executed functions, yielding output {tilde over (y)}_(nograd);

(vi) passing the output {tilde over (x)} through a discriminator network to provide the probability value p_(discr,real);

(vii) passing the output {tilde over (y)}_(nograd) through the discriminator network to provide the probability value p_(discr,pred);

(viii) obtaining a discriminator loss which is the sum of a classification loss of the discriminator network for real images acting on p_(discr,real) and a classification loss of the discriminator network for predicted images acting on p_(discr,pred);

(ix) backpropagating the discriminator loss;

(x) optimizing the discriminator network;

(xi) passing the output {tilde over (y)} through the discriminator network to provide the probability value p_(gen,pred);

(xii) obtaining an adversarial loss which is a classification loss of the encoder for predicted images acting on p_(gen,pred);

(xiii) obtaining a loss function which is the sum of the adversarial loss and an additional loss for the encoder which is a function of x and y;

(xiv) backpropagating the loss from step (xiii);

(xv) optimizing the encoder neural network parameterized by the parameters θ;

(xvi) repeating steps (i) to (xv) using a set of training images, to produce a trained set of parameters θ, and

(xvii) storing the trained set of parameters θ.

An advantage is strongly improved human-perceived visual quality of reconstructed images which have been encoded by the encoder neural network.

The method may be one wherein the discriminator network comprises an architecture which accepts one input tensor.

The method may be one wherein the discriminator network is a discriminator network as shown in FIG. 12.

The method may be one wherein the discriminator network comprises a convolutional neural network (CNN) architecture which consists of a plurality of sub-networks, each using tensor concatenation along a channel dimension.

The method may be one wherein the discriminator network is a discriminator network as shown in FIG. 13.

The method may be one wherein the discriminator network comprises an architecture in which a separate discriminator is assigned to every feature, wherein an overall discriminator is defined as a function of probabilities of all individual discriminators.

The method may be one wherein the discriminator network is a discriminator network as shown in FIG. 14.

The method may be one in which the loss function further includes Deep Render's adversarial Video Multimethod Assessment Fusion (VMAF) proxy, or a Learned Perceptual Image Patch Similarity (LPIPS) or a generative adversarial loss.

According to a 24th aspect of the invention, there is provided a computer program product executable on a processor to train an encoder neural network to reduce encoder distortions, the encoder neural network parameterized by parameters θ, the encoder being a neural network for use in lossy image or video compression, the computer program product executable on the processor to:

(i) receive an input training image x;

(ii) encode the input training image using the encoder neural network, to produce an image reconstruction y;

(iii) pass the input training image x through a feature embedding network that has been pre-trained on a training set of images to produce output {tilde over (x)} containing features;

(iv) pass the image reconstruction y through the feature embedding network to produce output {tilde over (y)} containing features;

(v) execute a function on {tilde over (y)} to ensure no gradients are tracked for the later executed functions, yielding output {tilde over (y)}_(nograd);

(vi) pass the output {tilde over (x)} through a discriminator network to provide the probability value p_(discr,real);

(vii) pass the output {tilde over (y)}_(nograd) through the discriminator network to provide the probability value p_(discr,pred);

(viii) obtain a discriminator loss which is the sum of a classification loss of the discriminator network for real images acting on p_(discr,real) and a classification loss of the discriminator network for predicted images acting on p_(discr,pred);

(ix) backpropagate the discriminator loss;

(x) optimize the discriminator network;

(xi) pass the output {tilde over (y)} through the discriminator network to provide the probability value p_(gen,pred);

(xii) obtain an adversarial loss which is a classification loss of the encoder for predicted images acting on p_(gen,pred);

(xiii) obtain a loss function which is the sum of the adversarial loss and an additional loss for the encoder which is a function of x and y;

(xiv) backpropagate the loss from (xiii);

(xv) optimize the encoder neural network parameterized by the parameters θ;

(xvi) repeating (i) to (xv) using a set of training images, to produce a trained set of parameters θ, and

(xvii) store the trained set of parameters θ.

The computer program product may be executable on the processor to perform a method of any aspect of the 23rd aspect of the invention.

Aspects of the invention may be combined.

In the above methods and systems, an image may be a single image, or an image may be a video image, or images may be a set of video images, for example.

The above methods and systems may be applied in the video domain.

For each of the above methods, a related system arranged to perform the method may be provided.

For each of the above training methods, a related computer program product may be provided.

BRIEF DESCRIPTION OF THE FIGURES

Aspects of the invention will now be described, by way of example(s), with reference to the following Figures, in which:

FIG. 1 shows a schematic diagram of an artificial intelligence (AI)-based compression process, including encoding an input image x using a neural network E( . . . ), and decoding using a neural network D( . . . ), to provide an output image {circumflex over (x)}. Runtime issues are relevant to the Encoder. Runtime issues are relevant to the Decoder. Examples of issues of relevance to parts of the process are identified.

FIG. 2 shows a schematic diagram of an artificial intelligence (AI)-based compression process, including encoding an input image x using a neural network E( . . . ), and decoding using a neural network D( . . . ), to provide an output image {circumflex over (x)}, and in which there is provided a hyper encoder and a hyper decoder. “Dis” denotes elements of a discriminator network.

FIG. 3 shows an example structure of an autoencoder with a hyperprior and a hyperhyperprior, where hyperhyperlatents ‘w’ encodes information regarding the latent entropy parameters ϕ_(z), which in turn allows for the encoding/decoding of the hyperlatents ‘z’, The model optimises over the parameters of all relevant encoder/decoder modules, as well as hyperhyperlatent entropy parameters ϕ_(w). Note that this hierarchical structure of hyperpriors can be recursively applied without theoretical limitations.

FIG. 4 shows a schematic diagram of an example encoding phase of an AI-based compression algorithm utilizing a linear implicit system (with corresponding Implicit Encoding Solver), for video or image compression. Related explanation is provided in section 1.4.2.

FIG. 5 shows a schematic diagram of an example decoding phase of an AI-based compression algorithm utilizing an implicit linear system (with corresponding Decode Solver), for video or image compression. Related explanation is provided in section 1.4.2.

FIG. 6 shows a worked example of constructing a Directed Acyclic Graph (DAG) given dependencies generated by an L-context matrix. (a) shows the L-context parameters associated with the i-th pixel in this example. The neighbouring context pixels are those directly above the current pixel, and the left neighbour. (b) shows pixels enumerated in raster scan order. Pixels in the same level of the Directed Acyclic Graph are coloured the same. (c) shows the resulting DAG. Those pixels on the same level are conditionally independent of each other, and can be encoded/decoded in parallel.

FIG. 7 shows an example encoding process with predicted context matrix Ly in an example AI-based compression pipeline. In this diagram a generic implicit solver is depicted, which could be any one of the methods discussed in Section 2.2.1, for example.

FIG. 8 shows an example decoding process with predicted context matrix Ly in an example AI-based compression pipeline. In this diagram a linear equation solver is depicted, which could be any one of the methods discussed in Section 2.2.2, for example.

FIG. 9 shows an example of an original image G (left) and its compressed reconstruction H (right), trained using a reconstruction loss incorporating contextual similarity Eq. (4.5). The compressed image has 0.16 bits per pixel and a peak-signal-to-noise ratio of 29.7.

FIG. 10 shows an example of an original image G (left) and its compressed reconstruction H (right), trained using a reconstruction loss incorporating adversarial loss Eq. (4.11) on VGG features. The compressed image has 0.17 bits per pixel and a peak-signal-to-noise ratio of 26.

FIG. 11 shows an example of an original image G (left) and its compressed reconstruction H (right), trained using a reconstruction loss incorporating adversarial loss Eq. (4.11) on VGG features. The compressed image has 0.18 bits per pixel and a peak-signal-to-noise ratio of 26.

FIG. 12 shows a diagram showing an example of architecture 1 of an example discriminator.

FIG. 13 shows a diagram showing an example of architecture 2 of an example discriminator.

FIG. 14 shows a diagram showing an example of architecture 3 of an example discriminator.

DETAILED DESCRIPTION

Technology Overview

We provide a high level overview of our artificial intelligence (AI)-based (e.g. image and/or video) compression technology.

In general, compression can be lossless, or lossy. In lossless compression, and in lossy compression, the file size is reduced. The file size is sometimes referred to as the “rate”.

But in lossy compression, it is possible to change what is input. The output image {circumflex over (x)} after reconstruction of a bitstream relating to a compressed image is not the same as the input image x. The fact that the output image {circumflex over (x)} may differ from the input image x is represented by the hat over the “x”. The difference between x and {circumflex over (x)} may be referred to as “distortion”, or “a difference in image quality”. Lossy compression may be characterized by the “output quality”, or “distortion”.

Although our pipeline may contain some lossless compression, overall the pipeline uses lossy compression.

Usually, as the rate goes up, the distortion goes down. A relation between these quantities for a given compression scheme is called the “rate-distortion equation”. For example, a goal in improving compression technology is to obtain reduced distortion, for a fixed size of a compressed file, which would provide an improved rate-distortion equation. For example, the distortion can be measured using the mean square error (MSE) between the pixels of x and {circumflex over (x)}, but there are many other ways of measuring distortion, as will be clear to the person skilled in the art. Known compression and decompression schemes include for example, JPEG, JPEG2000, AVC, HEVC, AVI.

Our approach includes using deep learning and AI to provide an improved compression and decompression scheme, or improved compression and decompression schemes.

In an example of an artificial intelligence (AI)-based compression process, an input image x is provided. There is provided a neural network characterized by a function E( . . . ) which encodes the input image x. This neural network E( . . . ) produces a latent representation, which we call y. The latent representation is quantized to provide ŷ, a quantized latent. The quantized latent goes to another neural network characterized by a function D( . . . ) which is a decoder. The decoder provides an output image, which we call {circumflex over (x)}. The quantized latent ŷ is entropy-encoded into a bitstream.

For example, the encoder is a library which is installed on a user device, e.g. laptop computer, desktop computer, smart phone. The encoder produces the y latent, which is quantized to ŷ, which is entropy encoded to provide the bitstream, and the bitstream is sent over the internet to a recipient device. The recipient device entropy decodes the bitstream to provide ŷ, and then uses the decoder which is a library installed on a recipient device (e.g. laptop computer, desktop computer, smart phone) to provide the output image {circumflex over (x)}.

E may be parametrized by a convolution matrix θ such that y=E_(θ)(x).

D may be parametrized by a convolution matrix Ω such that {circumflex over (x)}=D_(Ω)(ŷ).

We need to find a way to learn the parameters θ and Ω of the neural networks.

The compression pipeline may be parametrized using a loss function L. In an example, we use back-propagation of gradient descent of the loss function, using the chain rule, to update the weight parameters of θ and Ω of the neural networks using the gradients ∂L/∂w.

The loss function is the rate-distortion trade off. The distortion function is

(x, {circumflex over (x)}), which produces a value, which is the loss of the distortion

. The loss function can be used to back-propagate the gradient to train the neural networks.

So for example, we use an input image, we obtain a loss function, we perform a backwards propagation, and we train the neural networks. This is repeated for a training set of input images, until the pipeline is trained. The trained neural networks can then provide good quality output images.

An example image training set is the KODAK image set (e.g. at www.cs.albany.edu/˜xypan/research/snr/Kodak.html). An example image training set is the IMAX image set. An example image training set is the Imagenet dataset (e.g. at www.image-net.org/download). An example image training set is the CLIC Training Dataset P (“professional”) and M (“mobile”) (e.g. at http://challenge.compression.cc/tasks/).

In an example, the production of the bitstream from ŷ is lossless compression.

Based on Shannon entropy in information theory, the minimum rate (which corresponds to the best possible lossless compression) is the sum from i=1 to N of (p_(ŷ)(ŷ_(i))*log₂(p_(ŷ)(ŷ_(i)))) bits, where p_(ŷ) is the probability of ŷ, for different discrete ŷ values ŷ_(i), where ŷ={ŷ₁, ŷ₂ . . . ŷ_(N)}, where we know the probability distribution p. This is the minimum file size in bits for lossless compression of ŷ.

Various entropy encoding algorithms are known, e.g. range encoding/decoding, arithmetic encoding/decoding.

In an example, entropy coding EC uses ŷ and p_(ŷ) to provide the bitstream. In an example, entropy decoding ED takes the bitstream and p_(ŷ) and provides ŷ. This example coding/decoding process is lossless.

How can we get filesize in a differentiable way? We use Shannon entropy, or something similar to Shannon entropy. The expression for Shannon entropy is fully differentiable. A neural network needs a differentiable loss function. Shannon entropy is a theoretical minimum entropy value. The entropy coding we use may not reach the theoretical minimum value, but it is expected to reach close to the theoretical minimum value.

In the pipeline, the pipeline needs a loss that we can use for training, and the loss needs to resemble the rate-distortion trade off.

A loss which may be used for neural network training is Loss=

+λ*R, where

is the distortion function, λ is a weighting factor, and R is the rate loss. R is related to entropy. Both

and R are differentiable functions.

There are some problems concerning the rate equation.

The Shannon entropy H gives us some minimum file size as a function of ŷ and p_(ŷ) i.e. H(ŷ, p_(ŷ)). The problem is how can we know p_(ŷ), the probability distribution of the input? Actually, we do not know p_(ŷ). So we have to approximate p_(ŷ). We use q_(ŷ) as an approximation to p_(ŷ). Because we use q_(ŷ) instead of p_(ŷ), we are instead evaluating a cross entropy rather than an entropy. The cross entropy CE(ŷ, q_(ŷ)) gives us the minimum filesize for ŷ given the probability distribution q_(ŷ).

There is the relation

H(ŷ, p_(ŷ)) = CE(ŷ, q_(ŷ)) + KL(p_(ŷ)||q_(ŷ))

Where KL is the Kullback-Leibler divergence between p_(ŷ) and q_(ŷ). The KL is zero, if p_(ŷ) and q_(ŷ) are identical.

In a perfect world we would use the Shannon entropy to train the rate equation, but that would mean knowing p_(ŷ), which we do not know. We only know q_(ŷ), which is an assumed distribution.

So to achieve small file compression sizes, we need q_(ŷ) to be as close as possible to p_(ŷ). One category of our inventions relates to the q_(ŷ) we use.

In an example, we assume q_(ŷ) is a factorized parametric distribution.

One of our innovations is to make the assumptions about q_(ŷ) more flexible. This can enable q_(ŷ) to better approximate p_(ŷ), thereby reducing the compressed filesize.

As an example, consider that p_(ŷ) is a multivariate normal distribution, with a mean μ vector and a covariant matrix Σ. Σ has the size N×N, where N is the number of pixels in the latent space. Assuming ŷ with dimensions 1×12×512×512 (relating to images with e.g. 512×512 pixels), then Σ has the size 2.5 million squared, which is about 5 trillion, so therefore there are 5 trillion parameters in Σ we need to estimate. This is not computationally feasible. So, usually, assuming a multivariate normal distribution is not computationally feasible.

Let us consider p_(ŷ), which as we have argued is too complex to be known exactly. This joint probability density function p(ŷ) can be represented as a conditional probability function, as the second line of the equation below expresses.

$\begin{matrix} {{p\left( \hat{y} \right)} = {p\left( \left( {{\hat{y}}_{1}{\hat{y}}_{2}\ldots{\hat{y}}_{N}} \right) \right.}} \\ {= {{p\left( {\hat{y}}_{1} \right)}^{*}{p\left( {\hat{y}}_{2} \middle| {\hat{y}}_{1} \right)}^{*}{p\left( {\hat{y}}_{3} \middle| \left\{ {{\hat{y}}_{1},{\hat{y}}_{2}} \right\} \right)}^{*}\ldots}} \end{matrix}$

Very often p(ŷ) is approximated by a factorized probability density function

p(ŷ₁)^(*)p(ŷ₂)^(*)p(ŷ₃)^(*)…p(ŷ_(N))

The factorized probability density function is relatively easy to calculate computationally. One of our approaches is to start with a q_(ŷ) which is a factorized probability density function, and then we weaken this condition so as to approach the conditional probability function, or the joint probability density function p(ŷ), to obtain smaller compressed filzesizes. This is one of the class of innovations that we have.

Distortion functions

(x, {circumflex over (x)}), which correlate well with the human vision system, are hard to identify. There exist many candidate distortion functions, but typically these do not correlate well with the human vision system, when considering a wide variety of possible distortions.

We want humans who view picture or video content on their devices, to have a pleasing visual experience when viewing this content, for the smallest possible file size transmitted to the devices. So we have focused on providing improved distortion functions, which correlate better with the human vision system. Modern distortion functions very often contain a neural network, which transforms the input and the output into a perceptional space, before comparing the input and the output. The neural network can be a generative adversarial network (GAN) which performs some hallucination. There can also be some stabilization. It turns out it seems that humans evaluate image quality over density functions. We try to get p({circumflex over (x)}) to match p(x), for example using a generative method eg. a GAN.

Hallucinating is providing fine detail in an image, which can be generated for the viewer, where all the fine, higher spatial frequencies, detail does not need to be accurately transmitted, but some of the fine detail can be generated at the receiver end, given suitable cues for generating the fine details, where the cues are sent from the transmitter.

How should the neural networks E( . . . ), D( . . . ) look like? What is the architecture optimization for these neural networks? How do we optimize performance of these neural networks, where performance relates to filesize, distortion and runtime performance in real time? There are trade offs between these goals. So for example if we increase the size of the neural networks, then distortion can be reduced, and/or filesize can be reduced, but then runtime performance goes down, because bigger neural networks require more computational resources. Architecture optimization for these neural networks makes computationally demanding neural networks run faster.

We have provided innovation with respect to the quantization function Q. The problem with a standard quantization function is that it has zero gradient, and this impedes training in a neural network environment, which relies on the back propagation of gradient descent of the loss function. Therefore we have provided custom gradient functions, which allow the propagation of gradients, to permit neural network training.

We can perform post-processing which affects the output image. We can include in the bitstream additional information. This additional information can be information about the convolution matrix Ω, where D is parametrized by the convolution matrix Ω.

The additional information about the convolution matrix Ω can be image-specific. An existing convolution matrix can be updated with the additional information about the convolution matrix Ω, and decoding is then performed using the updated convolution matrix.

Another option is to fine tune the y, by using additional information about E. The additional information about E can be image-specific.

The entropy decoding process should have access to the same probability distribution, if any, that was used in the entropy encoding process. It is possible that there exists some probability distribution for the entropy encoding process that is also used for the entropy decoding process. This probability distribution may be one to which all users are given access; this probability distribution may be included in a compression library; this probability distribution may be included in a decompression library. It is also possible that the entropy encoding process produces a probability distribution that is also used for the entropy decoding process, where the entropy decoding process is given access to the produced probability distribution. The entropy decoding process may be given access to the produced probability distribution by the inclusion of parameters characterizing the produced probability distribution in the bitstream. The produced probability distribution may be an image-specific probability distribution.

FIG. 1 shows a schematic diagram of an artificial intelligence (AI)-based compression process, including encoding an input image x using a neural network, and decoding using a neural network, to provide an output image {circumflex over (x)}.

In an example of a layer in an encoder neural network, the layer includes a convolution, a bias and an activation function. In an example, four such layers are used.

In an example, we assume that q_(ŷ) is a factorized normal distribution, where y={y₁, y₂ . . . y_(N)), and ŷ=(ŷ₁, ŷ₂ . . . ŷ_(N)}. We assume each ŷ_(i) (i=1 to N) follows a normal distribution N e.g. with a mean μ of zero and a standard deviation σ of 1. We can define ŷ=Int(y−μ)+μ, where Int( ) is integer rounding.

The rate loss in the quantized latent space comes from, summing (Σ) from i=1 to N,

Rate = (∑log₂(q_(ŷ)(ŷ_(i))))/N = (∑N(ŷ_(i)|μ = 0, σ = 1))/N

The output image {circumflex over (x)} can be sent to a discriminator network, e.g. a GAN network, to provide scores, and the scores are combined to provide a distortion loss.

We want to make the q_(ŷ) flexible so we can model the p_(ŷ) better, and close the gap between the Shannon entropy and the cross entropy. We make the q_(ŷ) more flexible by using meta information. We have another neural network on our y latent space which is a hyper encoder. We have another latent space called z, which is quantized to {circumflex over (z)}. Then we decode the z latent space into distribution parameters such as μ and σ. These distribution parameters are used in the rate equation.

Now in the more flexible distribution, the rate loss is, summing (Σ) from i=1 to N,

Rate = (∑N(ŷ_(i)|μ_(i), σ_(i)))/N

So we make the q_(ŷ) more flexible, but the cost is that we must send meta information. In this system, we have

bitstream_(ŷ) = EC(ŷ, q_(ŷ)(μ, σ))ŷ = ED(bitstream_(ŷ), q_(ŷ)(μ, σ))

Here the z latent gets its own bitstream_({circumflex over (z)}) which is sent with bitstream_(ŷ). The decoder then decodes bitstream_({circumflex over (z)}) first, then executes the hyper decoder, to obtain the distribution parameters (μ, σ), then the distribution parameters (μ, σ) are used with bitstream_(ŷ) to decode the ŷ, which are then executed by the decoder to get the output image {circumflex over (x)}.

Although we now have to send bitstream_({circumflex over (z)}), the effect of bitstream_({circumflex over (z)}) is that it makes bitstream_(ŷ) smaller, and the total of the new bitstream_(ŷ) and bitstream_({circumflex over (z)}) is smaller than bitstream_(ŷ) without the use of the hyper encoder. This is a powerful method called hyperprior, and it makes the entropy model more flexible by sending meta information. The loss equation becomes

Loss = 𝒟(x, x̂) + λ₁^(*)R_(y) + λ₂^(*)R_(z)

It is possible further to use a hyper hyper encoder for z, optionally and so on recursively, in more sophisticated approaches.

The entropy decoding process of the quantized z latent should have access to the same probability distribution, if any, that was used in the entropy encoding process of the quantized z latent. It is possible that there exists some probability distribution for the entropy encoding process of the quantized z latent that is also used for the entropy decoding process of the quantized z latent. This probability distribution may be one to which all users are given access; this probability distribution may be included in a compression library; this probability distribution may be included in a decompression library. It is also possible that the entropy encoding process of the quantized z latent produces a probability distribution that is also used for the entropy decoding process of the quantized z latent, where the entropy decoding process of the quantized z latent is given access to the produced probability distribution. The entropy decoding process of the quantized z latent may be given access to the produced probability distribution by the inclusion of parameters characterizing the produced probability distribution in the bitstream. The produced probability distribution may be an image-specific probability distribution.

FIG. 2 shows a schematic diagram of an artificial intelligence (AI)-based compression process, including encoding an input image x using a neural network, and decoding using a neural network, to provide an output image {circumflex over (x)}, and in which there is provided a hyper encoder and a hyper decoder.

In a more sophisticated approach, the distortion function

(x, {circumflex over (x)}) has multiple contributions. The discriminator networks produce a generative loss L_(GEN). For example a Visual Geometry Group (VGG) network may be used to process x to provide m, and to process {circumflex over (x)} to provide {circumflex over (m)}, then a mean squared error (MSE) is provided using m and {circumflex over (m)} as inputs, to provide a perceptual loss. The MSE using x and {circumflex over (x)} as inputs, can also be calculated. The loss equation becomes

Loss = λ₁^(*)R_(y) + λ₂^(*)R_(z) + λ₃^(*)MSE(x, x̂) + λ₄^(*)L_(GEN) + λ₅^(*)VGG(x, x̂),

where the first two terms in the summation are the rate loss, and where the final three terms in the summation are the distortion loss

(x, {circumflex over (x)}). Sometimes there can be additional regularization losses, which are there as part of making training stable.

Notes Re HyperPrior and HyperHyperPrior

Regarding a system or method not including a hyperprior, if we have a y latent without a HyperPrior (i.e. without a third and a fourth network), the distribution over the y latent used for entropy coding is not thereby made flexible. The HyperPrior makes the distribution over the y latent more flexible and thus reduces entropy/filesize. Why? Because we can send y-distribution parameters via the HyperPrior. If we use a HyperPrior, we obtain a new, z, latent. This z latent has the same problem as the “old y latent” when there was no hyperprior, in that it has no flexible distribution. However, as the dimensionality re z usually is smaller than re y, the issue is less severe.

We can apply the concept of the HyperPrior recursively and use a HyperHyperPrior on the z latent space of the HyperPrior. If we have a z latent without a HyperHyperPrior (i.e. without a fifth and a sixth network), the distribution over the z latent used for entropy coding is not thereby made flexible. The HyperHyperPrior makes the distribution over the z latent more flexible and thus reduces entropy/filesize. Why? Because we can send z-distribution parameters via the HyperHyperPrior. If we use the HyperHyperPrior, we end up with a new w latent. This w latent has the same problem as the “old z latent” when there was no hyperhyperprior, in that it has no flexible distribution. However, as the dimensionality re w usually is smaller than re z, the issue is less severe. An example is shown in FIG. 3.

The above-mentioned concept can be applied recursively. We can have as many HyperPriors as desired, for instance: a HyperHyperPrior, a HyperHyperHyperPrior, a HyperHyperHyperHyperPrior, and so on.

GB Patent application no. 2016824.1, filed 23 Oct. 2020, is incorporated by reference.

PCT application PCT/GB2021/051041 entitled “IMAGE COMPRESSION AND DECODING, VIDEO COMPRESSION AND DECODING: METHODS AND SYSTEMS”, filed 29 Apr. 2021, is incorporated by reference.

Notes Re Training

Regarding seeding the neural networks for training, all the neural network parameters can be randomized with standard methods (such as Xavier Initialization). Typically, we find that satisfactory results are obtained with sufficiently small learning rates.

Note

It is to be understood that the arrangements referenced herein are only illustrative of the application for the principles of the present inventions. Numerous modifications and alternative arrangements can be devised without departing from the spirit and scope of the present inventions. While the present inventions are shown in the drawings and fully described with particularity and detail in connection with what is presently deemed to be the most practical and preferred examples of the inventions, it will be apparent to those of ordinary skill in the art that numerous modifications can be made without departing from the principles and concepts of the inventions as set forth herein. 

1. A computer-implemented method for lossy or lossless image or video compression and transmission, the method including the steps of: (i) receiving an input image; (ii) encoding the input image using an encoder trained neural network, to produce a y latent representation; (iii) encoding the y latent representation using a hyperencoder trained neural network, to produce a z hyperlatent representation; (iv) quantizing the z hyperlatent representation using a predetermined entropy parameter to produce a quantized z hyperlatent representation; (v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using predetermined entropy parameters; (vi) processing the quantized z hyperlatent representation using a hyperdecoder trained neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation; (vii) processing the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals; (viii) entropy encoding the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y); and (ix) transmitting the first bitstream and the second bitstream.
 2. The method of claim 1, in which the implicit encoding solver solves the implicit equations: (I) the quantized latent residuals equal a quantisation function of the sum of the y latent representation minus μ_(y) minus A_(y) acting on the quantised y latent representation; and (II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.
 3. The method claim 2, wherein the implicit encoding solver solves the implicit equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used.
 4. The method of claim 2, wherein the implicit encoding solver solves the implicit equations using an iterative solver, in which iteration is terminated when a convergence criterion is met.
 5. The method claim 1, wherein the implicit encoding solver returns residuals, and a quantized latent representation y.
 6. The method of claim 1, wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse, banded structure, or A is a block matrix, or A is constructed so that its matrix norm is less than one, or A is parametrised via a matrix factorisation such as a LU or QR decomposition.
 7. A computer-implemented method for lossy or lossless image or video decoding, the method including the steps of: (i) receiving a first bitstream and a second bitstream; (ii) decoding the first bitstream using an arithmetic decoder, using predetermined entropy parameters, to produce a quantized z hyperlatent representation; (iii) decoding the quantized z hyperlatent representation using a hyperdecoder trained neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation; (iv) decoding the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals; (v) processing the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit decoding solver, to obtain a quantized y latent representation; (vi) decoding the quantized y latent representation using a decoder trained neural network, to obtain a reconstructed image.
 8. The method of claim 7, in which the implicit decoding solver solves the implicit equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.
 9. The method of claim 7, in which the implicit decoding solver uses an iterative solver, in which iteration is terminated when a convergence criterion is reached.
 10. The method of claim 7, in which the implicit decoding solver is not the same type of solver as the solver used in encoding.
 11. A computer implemented method of training an encoder neural network, a decoder neural network, a hyperencoder neural network, and a hyperdecoder neural network, and entropy parameters, the neural networks, and the entropy parameters, being for use in lossy image or video compression, transmission and decoding, the method including the steps of: (i) receiving an input training image; (ii) encoding the input training image using the encoder neural network, to produce a y latent representation; (iii) encoding the y latent representation using the hyperencoder neural network, to produce a z hyperlatent representation; (iv) quantizing the z hyperlatent representation using an entropy parameter of the entropy parameters to produce a quantized z hyperlatent representation; (v) entropy encoding the quantized z hyperlatent representation into a first bitstream, using the entropy parameters; (vi) processing the quantized z hyperlatent representation using the hyperdecoder neural network to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of the y latent representation; (vii) processing the y latent representation, the location entropy parameter μ_(y) and the context matrix A_(y), using an implicit encoding solver, to obtain quantized latent residuals; (viii) entropy encoding the quantized latent residuals into a second bitstream, using the entropy scale parameter σ_(y); (ix) decoding the first bitstream using an arithmetic decoder, using the entropy parameters, to produce a quantized z hyperlatent representation; (x) decoding the quantized z hyperlatent representation using the hyperdecoder neural network, to obtain a location entropy parameter μ_(y), an entropy scale parameter σ_(y), and a context matrix A_(y) of a y latent representation; (xi) decoding the second bitstream using the entropy scale parameter σ_(y) in an arithmetic decoder, to output quantised latent residuals; (xii) processing the quantized latent residuals, the location entropy parameter μ_(y) and the context matrix A_(y), using an (e.g. implicit) (e.g. linear) decoding solver, to obtain a quantized y latent representation; (xiii) decoding the quantized y latent representation using the decoder neural network, to obtain a reconstructed image; (xiv) evaluating a loss function based on differences between the reconstructed image and the input training image, and a rate term; (xv) evaluating a gradient of the loss function; (xvi) back-propagating the gradient of the loss function through the decoder neural network, through the hyperdecoder neural network, through the hyperencoder neural network and through the encoder neural network, and using the entropy parameters, to update weights of the encoder, decoder, hyperencoder and hyperdecoder neural networks, and to update the entropy parameters; and (xvii) repeating steps (i) to (xvi) using a set of training images, to produce a trained encoder neural network, a trained decoder neural network, a trained hyperencoder neural network and a trained hyperdecoder neural network, and trained entropy parameters; and (xviii) storing the weights of the trained encoder neural network, the trained decoder neural network, the trained hyperencoder neural network and the trained hyperdecoder neural network, and storing the trained entropy parameters.
 12. The method of claim 11, in which the implicit encoding solver solves the implicit equations: (I) the quantized latent residuals equal a quantisation function of the sum of the y latent representation minus μ_(y) minus A_(y) acting on the quantised y latent representation; and (II) the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.
 13. The method of claim 11, in which the implicit decoding solver solves the implicit equation that the quantised y latent representation equals the quantized latent residuals plus μ_(y) plus A_(y) acting on the quantised y latent representation.
 14. The method of claim 12, wherein the implicit encoding solver solves the implicit equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used.
 15. The method of claim 12, wherein the (e.g. implicit) (e.g. linear) decoding solver solves the (e.g. implicit) equations by defining B=I−A, where A is a m×m matrix, and I is the m×m identity matrix, wherein (a) if B is lower triangular, then the serial method forward substitution is used; or (b) if B is upper triangular, then the serial method backward substitution is used; or (c) B is factorised as a triangular decomposition, and then B*y=μ+{circumflex over (ξ)}, where {circumflex over (ξ)} is the quantized residual, is solved by inverting lower triangular factors with forward substitution, and by inverting upper triangular factors with backward substitution; or (d) B is factorised with a QR decomposition, where Q is an orthonormal matrix and R is an upper triangular matrix, and the solution is y=R⁻¹ Q^(t)μ, where Q^(t) is Q transpose, or B is factorized using B=QL, where L is a lower triangular matrix, or B=RQ, or B=LQ, where Q is inverted by its transpose, R is inverted with back substitution, and L is inverted with forward substitution, and then respectively, the solution is y=L⁻¹ Q^(t)μ, or y=Q^(t) R⁻¹μ, or y=Q^(t) L⁻¹μ; or (e) B=D+L+U, with D a diagonal matrix, and here L is a strictly lower triangular matrix, and U a strictly upper triangular matrix, and then the iterative Jacobi method is applied, until a convergence criterion is met; or (f) the Gauss-Seidel method is used; or (g) the Successive Over Relaxation method is used, or (h) the Conjugate Gradient method is used.
 16. The method of claim 11, wherein the quantized y latent representation returned by the implicit encoding solver is used elsewhere in the data compression pipeline.
 17. The method of claim 11, wherein the implicit encoding solver solves the implicit equations using an iterative solver, in which iteration is terminated when a convergence criterion is met.
 18. The method of claim 11, wherein the implicit encoding solver returns residuals, and a quantized latent representation y.
 19. The method of claim 11, wherein the matrix A is lower triangular, upper triangular, strictly lower triangular, strictly upper triangular, or A has a sparse, banded structure, or A is a block matrix, or A is constructed so that its matrix norm is less than one, or A is parametrised via a matrix factorisation such as a LU or QR decomposition.
 20. The method of claim 11, wherein the implicit decoding solver is not the same type of solver as the solver used in encoding. 